#ifndef DYNAMICSHAPE_H
#define DYNAMICSHAPE_H

/***************************************
*           INCLUDES
***************************************/
//standard library
#include <vector>

//parent
#include "shape.h"

//command
#include "../../command/command.h"

/***************************************
*           FORWARD DECLARATIONS
***************************************/

//game
class Game;

//byteBuffer
class ByteBuffer;

//ability
class Ability;

//parser
class Parser;

/**********************************
*          CLASS
**********************************/
class ShapeDynamic : public Shape
{

public:
ShapeDynamic(unsigned int index, Game* game, Client* client, Vector3D* position, Vector3D* velocity, Vector3D* rotation, Ogre::Root* root,
	  bool animated, bool collidable, float collisionRadius, int meshCode, bool ai);
~ShapeDynamic();

/************************************************
*                VARIABLES
*************************************************/


//stats
Vector3D* mPosition;

int			mIndex;

Command	mCommand;		// current frame's commands we are about to or are running this on shapes on server.
Command mLastCommand;   //this is the last command sent to clients and also that was ran on server

Message	mMessage; //is this all i need to get information over the internets?

//keys
Vector3 mKeyDirection;
float mKeyRotation;
Vector3 mGoalDirection;

//abilitys
std::vector<Ability*> mAbilityVector;	 //all abilitys for this shape

/*************************************************
*				METHODS
**************************************************/

//abilitys
void     addAbility(Ability* ability);
Ability* getAbility(Ability* ability);

//movement
virtual float       getDegreesToSomething(Vector3D* something                       ) = 0;
virtual void        yaw                  (float amountToYaw, bool converToDegree   ) = 0;
virtual void        translate            (Vector3D* translateVector, int perspective) = 0;
virtual std::string getName() = 0; 

//ticks
void processTick();
void interpolateTick(float renderTime);

//messaging
void readDeltaMoveCommand(ByteBuffer *mes);

//byteBuffer
void parseByteBuffer(ByteBuffer* byteBuffer);

//ghost
void moveGhostShape();


};

#endif

